<template>
    <view v-if="guide" class="hd">
		<view class="hd-bg"></view>
        <image @click="touchend" class="hd-image" :src="static_media.img01" alt=""></image>
    </view>
</template>

<script>
    import { mapState } from 'vuex';

    export default {
        data () {
            return {
                guide:false,
            }
        },
        computed:{
            ...mapState(['subject', 'userinfo']),
            static_media() {
                return {
                    img01: this.$myConfig.localMedia + '/static/img/hd.png',
                }
            }
        },
        methods:{
            //是否显示引导
            if_guide(){
				let key='guide'+this.userinfo.user_id.toString()
				try {
				    const value = uni.getStorageSync(key);
				    if (value) {
				    }else{
				        this.guide=true
				    }
				} catch (e) {
				    // error
				
				}
            },
            touchend(){
                let key='guide'+this.userinfo.user_id.toString()
                try {
                    uni.setStorageSync(key,'true');
                    this.guide=false;
                } catch (e) {
                }
            },
        }
    }
</script>

<style scoped>
.hd{
bottom: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.hd-image{
width: 360px;
height: 258px;
z-index: 111;
position: absolute;
bottom: 80px;
left: 9px;

}
.hd-bg{
background: rgba(0, 0, 0, 0.8);
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 111;
}

</style>
